\(\int \frac {\cos ^2(x)}{a-a \sin ^2(x)} \, dx\) [269]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 16, antiderivative size = 5 \[ \int \frac {\cos ^2(x)}{a-a \sin ^2(x)} \, dx=\frac {x}{a} \]

[Out]

x/a

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 5, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {3254, 8} \[ \int \frac {\cos ^2(x)}{a-a \sin ^2(x)} \, dx=\frac {x}{a} \]

[In]

Int[Cos[x]^2/(a - a*Sin[x]^2),x]

[Out]

x/a

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3254

Int[(u_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Dist[a^p, Int[ActivateTrig[u*cos[e + f*x
]^(2*p)], x], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0] && IntegerQ[p]

Rubi steps \begin{align*} \text {integral}& = \frac {\int 1 \, dx}{a} \\ & = \frac {x}{a} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 5, normalized size of antiderivative = 1.00 \[ \int \frac {\cos ^2(x)}{a-a \sin ^2(x)} \, dx=\frac {x}{a} \]

[In]

Integrate[Cos[x]^2/(a - a*Sin[x]^2),x]

[Out]

x/a

Maple [A] (verified)

Time = 0.26 (sec) , antiderivative size = 6, normalized size of antiderivative = 1.20

method result size
risch \(\frac {x}{a}\) \(6\)
default \(\frac {\arctan \left (\tan \left (x \right )\right )}{a}\) \(8\)
norman \(\frac {\frac {x \left (\tan ^{4}\left (\frac {x}{2}\right )\right )}{a}+\frac {x \left (\tan ^{6}\left (\frac {x}{2}\right )\right )}{a}-\frac {x}{a}-\frac {x \left (\tan ^{2}\left (\frac {x}{2}\right )\right )}{a}}{\left (1+\tan ^{2}\left (\frac {x}{2}\right )\right )^{2} \left (\tan ^{2}\left (\frac {x}{2}\right )-1\right )}\) \(63\)

[In]

int(cos(x)^2/(a-a*sin(x)^2),x,method=_RETURNVERBOSE)

[Out]

x/a

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 5, normalized size of antiderivative = 1.00 \[ \int \frac {\cos ^2(x)}{a-a \sin ^2(x)} \, dx=\frac {x}{a} \]

[In]

integrate(cos(x)^2/(a-a*sin(x)^2),x, algorithm="fricas")

[Out]

x/a

Sympy [A] (verification not implemented)

Time = 0.46 (sec) , antiderivative size = 2, normalized size of antiderivative = 0.40 \[ \int \frac {\cos ^2(x)}{a-a \sin ^2(x)} \, dx=\frac {x}{a} \]

[In]

integrate(cos(x)**2/(a-a*sin(x)**2),x)

[Out]

x/a

Maxima [A] (verification not implemented)

none

Time = 0.40 (sec) , antiderivative size = 5, normalized size of antiderivative = 1.00 \[ \int \frac {\cos ^2(x)}{a-a \sin ^2(x)} \, dx=\frac {x}{a} \]

[In]

integrate(cos(x)^2/(a-a*sin(x)^2),x, algorithm="maxima")

[Out]

x/a

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 14 vs. \(2 (5) = 10\).

Time = 0.30 (sec) , antiderivative size = 14, normalized size of antiderivative = 2.80 \[ \int \frac {\cos ^2(x)}{a-a \sin ^2(x)} \, dx=\frac {\arctan \left (\frac {{\left | a \right |} \tan \left (x\right )}{a}\right )}{{\left | a \right |}} \]

[In]

integrate(cos(x)^2/(a-a*sin(x)^2),x, algorithm="giac")

[Out]

arctan(abs(a)*tan(x)/a)/abs(a)

Mupad [B] (verification not implemented)

Time = 12.92 (sec) , antiderivative size = 5, normalized size of antiderivative = 1.00 \[ \int \frac {\cos ^2(x)}{a-a \sin ^2(x)} \, dx=\frac {x}{a} \]

[In]

int(cos(x)^2/(a - a*sin(x)^2),x)

[Out]

x/a